﻿using System;
using Citi.Scheduler.Domain;
using System.Runtime.Serialization;

namespace Citi.Scheduler.Wcf.DataContracts
{
    [DataContract]
    public class RoutineExecutionHistoryDataContract
    {
        public RoutineExecutionHistoryDataContract(RoutineExecutionHistory routineExecutionHistory)
        {
            if (routineExecutionHistory == null) return;

            Date = routineExecutionHistory.Date;
            Details = routineExecutionHistory.Details;
            Status = (RoutineExecutionStatus)routineExecutionHistory.Status;
        }

        public DateTime Date { get; set; }
        public string Details { get; set; }
        public RoutineExecutionStatus Status { get; set; }
    }
}